<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>更新时间管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		var ca = new Array();
		var b = 0;
		function cha(wiid){
			for(var j = 0;j<b;j++){
				if(wiid.equals(ca[j])){
					return;
				}
			}
			ca[b] = wiid;
			b ++;
		}
		function cli(di){
			var t = new Array();
			for(var j = 0;j<b;j++){
				var atime = $('[name="'+ca[j]+'acceptedTime"]').val();
				var stime = $('[name="'+ca[j]+'submitTime"]').val();
				t[j] = ca[j]+"@"+atime+"@"+stime;
			}
			
			location = di+"/ta/updatetime/updateTimes?str="+t;
		}
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li><a href="${ctx}/ta/updatetime/">更新时间列表</a></li>
		<li class="active"><a>更新时间<shiro:hasPermission name="ta:updatetime:edit">${not empty updatetime.id?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission name="ta:updatetime:edit">查看</shiro:lacksPermission></a></li>
	</ul><br/>
	<sys:message content="${message}"/>
		<table id="contentTable" class="table table-striped table-bordered table-condensed">
			<tr>
				<th><div align="center">岗位</div></th>
				<th><div align="center">经办人</div></th>
				<th><div align="center">岗位编号</div></th>
				<th><div align="center">接收时间</div></th>
				<th><div align="center">提交时间</div></th>
				<th>
					
				</th>
			</tr>
			<c:forEach items="${ls}" var="ls">
				<tr>
					<td><div align="center">${ls.step}</div></td>
					<td><div align="center">${ls.userName}</div></td>
					<td><div align="center">${ls.wiid}</div></td>
					<td>
						<div align="center"><input onchange="cha('${ls.wiid}');" type="text" value="<fmt:formatDate value="${ls.acceptedTime}" pattern="yyyy-MM-dd HH:mm:ss" />" name="${ls.wiid}acceptedTime" htmlEscape="false" maxlength="512" class="input-medium" /></div>
					</td>
					<td>
						<div align="center"><input onchange="cha('${ls.wiid}');" type="text" value="<fmt:formatDate value="${ls.submitTime}" pattern="yyyy-MM-dd HH:mm:ss" />" name="${ls.wiid}submitTime" htmlEscape="false" maxlength="512" class="input-medium" /></div>
					</td>
				</tr>
			</c:forEach>
				<tr>
					<td colspan="4"></td>
					<td>
						<div align="center">
							<input onclick="cli('${ctx}')" class="btn btn-primary" type="button" value="保  存"/>
							<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
						</div>
					</td>
				</tr>
		</table>
</body>
</html>